import 'package:boss/textStyle/text_style.dart';
import 'package:boss/ui/page/login/constant/login_type.dart';
import 'package:boss/ui/page/login/provider/login_provider.dart';
import 'package:boss/ui/widget/label_button.dart';
import 'package:hi_common/hi_common.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

class LoginToggleBtn extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(
        top: 18.w,
        right: 55.w,
      ),
      alignment: Alignment.centerRight,
      child: Consumer<LoginProvider>(
        builder: (context, loginProvider, _) {
          return LabelButton(
            title: loginTypeMap[loginProvider.loginType],
            textStyle: TextStyleConstant().blue_24,
            onTap: () {
              loginProvider.toggleLoginType();
            },
          );
        },
      ),
    );
  }
}
